{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/addons/builder/css/base.css" media="all">
<style>
    .layui-form-item{
        margin-top: 20px !important;
    }
</style>
<body>
    
<form action="{:url('preceptOffer')}" class="layui-form  v3-admin-form" id="form">
    <div class="layui-fluid layui-anim layui-anim-downbit">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;">
                <div class="layui-row" style="padding-top: 8px">
                    <input type="hidden" name="id" value="{$info.id}"/>
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                        <div class="layui-form-item">
                            <label class="layui-form-label">需求</label>
                            <div class="layui-input-block">
                               <input class="layui-input" disabled value="{$info.typeText}"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                        <div class="layui-form-item">
                            <label class="layui-form-label">方案需求内容</label>
                            <div class="layui-input-block">
                               <textarea class="layui-textarea" disabled>{$info.content}</textarea>
                            </div>
                        </div>
                    </div>
                    
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md6">
                        <div class="layui-form-item">
                            <label class="layui-form-label">方案需求图片</label>
                            <div class="layui-input-block">
                                <?php $data = isset($info)?$info:[];?>
                                {table:alone view='items/imgshow' info='$data' form='["field" =>
                                "images","title"=>"方案需求图片", "value" => 10]'/}
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                        <div class="layui-form-item">
                            <label class="layui-form-label">方案需求备注</label>
                            <div class="layui-input-block">
                               <textarea class="layui-textarea" disabled>{$info.note}</textarea>
                            </div>
                        </div>
                    </div>

                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                        <div class="layui-form-item">
                            <label class="layui-form-label">方案内容</label>
                            <div class="layui-input-block">
                               <textarea class="layui-textarea" disabled>{$info.precept_title}</textarea>
                            </div>
                        </div>
                    </div>
                    
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md6">
                        <div class="layui-form-item">
                            <label class="layui-form-label">方案图片</label>
                            <div class="layui-input-block">
                                <?php $data = isset($info)?$info:[];?>
                                {table:alone view='items/imgshow' info='$data' form='["field" =>
                                "precept_images","title"=>"方案图片", "value" => 10]'/}
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                        <div class="layui-form-item">
                            <label class="layui-form-label">方案备注</label>
                            <div class="layui-input-block">
                               <textarea class="layui-textarea" disabled>{$info.precept_note}</textarea>
                            </div>
                        </div>
                    </div>
                    
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                        <div class="layui-form-item">
                            <label class="layui-form-label">审核</label>
                            <div class="layui-input-block">
                                <input type="radio" name="audit" value="1" title="报价" lay-filter="audit">
                                <input type="radio" name="audit" value="2" title="方案驳回" lay-filter="audit">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12" id="price">
                        <div class="layui-form-item">
                            <label class="layui-form-label">报价</label>
                            <div class="layui-input-block">
                                <input type="number" name="price" placeholder="请输入报价" autocomplete="off" class="layui-input"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12" id="precept_reject">
                        <div class="layui-form-item">
                            <label class="layui-form-label">方案驳回原因</label>
                            <div class="layui-input-block">
                               <textarea class="layui-textarea" name="reject_msg"></textarea>
                            </div>
                        </div>
                    </div>
                    {if $info.precept_reject!=''}
                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                        <div class="layui-form-item">
                            <label class="layui-form-label">用户驳回</label>
                            <div class="layui-input-block">
                                <textarea class="layui-textarea" disabled>{$info.precept_reject}</textarea>
                            </div>
                        </div>
                    </div>
                    {/if}
                </div>
            </div>
        </div>
    </div>
    {include file="public/submit" /}
</form>
</body>
{include file="public/footer" /}
<script>
    $('#price').hide();
    $('#precept_reject').hide();
    layui.use(['layer', 'jquery', 'form'], function () {
        var layer = layui.layer,
            $ = layui.jquery,
            form = layui.form;
        // 监听单选框的选择事件
        form.on('radio(audit)', function(data){
            if(data.value==1){
                $('#price').show();
                $('#precept_reject').hide();
            }else{
                $('#price').hide();
                $('#precept_reject').show();
            }
        });
    });
</script>
</html>